// 微信消息接口定义

export  interface WechatMessage {
    FromUserName: string;
    ToUserName: string;
    CreateTime: Number;
    MsgId: string;
}

export interface CommonWechatMessage extends WechatMessage {
    MsgDataId: string;
    MsgType: MessageType;
    idx: string;
}

export interface TextWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.TEXT;
    Content: string;
}

export interface ImageWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.IMAGE;
    PicUrl: string;
    MediaId: string;
}


export interface VoiceWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.VOICE;
    MediaId: string;
    Format: string;
    Recognition?: string;
}

export interface VideoWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.VIDEO;
    MediaId: string;
    ThumbMediaId: string;
}

export interface ShortVideoWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.SHORT_VIDEO;
    MediaId: string;
    ThumbMediaId: string;
}

export interface LocationWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.LOCATION;
    Location_X: Number;
    Location_Y: Number;
    Scale: Number;
    Label: Number;
}


export interface LinkWechatMessage extends CommonWechatMessage {
    MsgType: MessageType.LINK;
    Title: string;
    Description: string;
    Url: string;
}


export interface WechatEventMessage extends WechatMessage {
    MsgType: MessageType.EVENT;
}

export interface SubscribeWechatEventMessage extends WechatEventMessage {
    Event: EventMessageType.SUBSCRIBE;
}


export interface UnsubscribeWechatEventMessage extends WechatEventMessage {
    Event: EventMessageType.UNSUBSCRIBE;
}


export interface ClickWechatEventMessage extends WechatEventMessage {
    Event: EventMessageType.CLICK;
}


export interface LocationWechatEventMessage extends WechatEventMessage {
    Event: EventMessageType.LOCATION;
}


export interface ScanWechatEventMessage extends WechatEventMessage {
    Event: EventMessageType.SCAN;
}


export interface ViewWechatEventMessage extends WechatEventMessage {
    Event: EventMessageType.VIEW;
}